package com.csnf.service;

import com.csnf.dao.SingerDao;
import com.csnf.entity.Singer;
import com.csnf.util.MybatisUtil;

import java.util.List;

public class SingerService {
    SingerDao singerDao;

    public List<Singer> getSinger(String singerName,String sex,String piaoshu1,String piaoshu2){
        singerDao=MybatisUtil.init().getMapper(SingerDao.class);
        List<Singer> list=singerDao.getSinger(singerName,sex,piaoshu1,piaoshu2);
        MybatisUtil.close();
        return list;
    }
    public int updateToupiao(String sid){
        singerDao=MybatisUtil.init().getMapper(SingerDao.class);
        int i=singerDao.updateToupiao(sid);
        MybatisUtil.close();
        return i;
    }
}
